<template>
  <div class="block">
    <span class="demonstration">兄弟组件2</span>
    <el-slider v-model="value2" @change="sendPercent"></el-slider>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        value1: 0,
        value2: 50,
        value3: 36,
        value4: 48,
        value5: 42
      }
    },
    methods: {
      formatTooltip(val) {
        sendPercent(val/100)
        return val / 100;
      },
      sendPercent(){
        //   console.log(1)
          console.log(this.value2)
        //   alert(222)
          this.$emit('child-percent', this.value2);
      }
    }
  }
</script>